<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<c:set var="current_year_amt"><x:out  select="$xmlData/data/proposal/budget/current_year_amt"/></c:set>
<c:set var="second_year_amt"><x:out  select="$xmlData/data/proposal/budget/second_year_amt"/></c:set>
<c:set var="third_year_amt"> <x:out  select="$xmlData/data/proposal/budget/third_year_amt"/></c:set>

<div class="t_bar">	
	<!-- <span class="color_red">*</span> -->资金概算（万元）
</div>

<table class="t_css table01" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="fundInfo_from">
	<tr class=" t_tr">
		<td align="center" width="20%" rowspan="2">资金来源概算</td>
		<td class=" TblHead" align="center" width="20%" rowspan="2">概算金额</td>
		<td class=" TblHead" align="center" width="60%"  colspan="3">其中</td>
	</tr>
	<tr>
		<td class="TblHead" align="center" ><span id="select_yea1" class="yea" label="第一个年度" name="budget/select_yea1"
			onfocus="InitInput.setNumber(this,4,0,0)" style="width: 30px;text-align: right;">${param.statYear }</span>年</td>
		<td class="TblHead" align="center" ><span id="select_yea2" class=" yea"  name="budget/select_yea2" label="第二个年度"
			
			onfocus="InitInput.setNumber(this,4,0,0)" style="width: 30px;text-align: right;">${param.statYear+1 }</span>年</td>
		<td class="TblHead" align="center" ><span id="select_yea3" class=" yea"  name="budget/select_yea3" label="第三个年度"
			onfocus="InitInput.setNumber(this,4,0,0)" style="width: 30px;text-align: right;">${param.statYear+2 }</span>年</td>
	</tr>
	<tr>
		<td align="left">1、省财政拨款</td>
		<td align="center">
			<input type="hidden" name="budget/invest_detail_from/invest[00]@invest_code" value="00" />
			<input type="hidden" name="budget/invest_detail_from/invest[00]/name" value="1、中央财政拨款" />
			
			<input type="text" name="budget/invest_detail_from/invest[00]/total_each" id="total_each_0"
				 disabled="disabled" value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='00']/total_each"/>" 
				class="gray valueEqual:total_each_0:total_gross" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;width: 80%"
				label="资金来源概算-->中央财政拨款-->概算金额"/>
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[00]/total_invest_yea1" id="total_invest_yea1_0"
				     style="text-align:right; width:80%;" class="" label="资金来源概算-->${param.statYear}年-->中央财政拨款"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='00']/total_invest_yea1" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[00]/total_invest_yea2" id="total_invest_yea2_0"
				     style="text-align:right; width:80%;"  class="" label="资金来源概算-->${param.statYear+1}年-->中央财政拨款"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='00']/total_invest_yea2" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 "
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[00]/total_invest_yea3" id="total_invest_yea3_0"
				     style="text-align:right; width:80%;" class="" label="资金来源概算-->${param.statYear+2}年-->中央财政拨款"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='00']/total_invest_yea3" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
	</tr>
	<tr>
		<td align="left">2、市（县）财政拨款</td>
		<td align="center">
			<input type="hidden" name="budget/invest_detail_from/invest[01]@invest_code" value="01" />
			<input type="hidden" name="budget/invest_detail_from/invest[01]/name" value="2、市（县）财政拨款" />
			
			<input type="text" name="budget/invest_detail_from/invest[01]/total_each" id="total_each_1"
				 disabled="disabled" value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='01']/total_each"/>" 
				class="gray" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;width: 80%"
				label="资金来源概算-->市（县）财政拨款-->概算金额"/>
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[01]/total_invest_yea1" id="total_invest_yea1_1"
				     style="text-align:right; width:80%;"  class="" label="资金来源概算-->${param.statYear }年-->市（县）财政拨款"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='01']/total_invest_yea1" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[01]/total_invest_yea2" id="total_invest_yea2_1"
				     style="text-align:right; width:80%;"   class=" " label="资金来源概算-->${param.statYear+1}年-->市（县）财政拨款"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='01']/total_invest_yea2" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[01]/total_invest_yea3" id="total_invest_yea3_1"
				     style="text-align:right; width:80%;"  class=" " label="资金来源概算-->${param.statYear+2}年-->市（县）财政拨款"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='01']/total_invest_yea3" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
	</tr>
	<tr>
		<td align="left">3、单位自筹经费</td>
		<td align="center">
			<input type="hidden" name="budget/invest_detail_from/invest[03]@invest_code" value="03" />
			<input type="hidden" name="budget/invest_detail_from/invest[03]/name" value="单位自筹经费" />
			
			<input type="text" name="budget/invest_detail_from/invest[03]/total_each" id="total_each_3"
				 disabled="disabled" value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='03']/total_each"/>" 
				class=" gray " onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;width: 80%"
				label="资金来源概算-->单位自筹经费-->概算金额"/>
			
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[03]/total_invest_yea1" id="total_invest_yea1_3" 
				     style="text-align:right; width:80%;"  class=" valueGreatEqual:total_invest_yea1_3:total_invest_yea1_2"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='03']/total_invest_yea1" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"  label="资金来源概算-->${param.statYear }年-->单位自筹经费"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[03]/total_invest_yea2" id="total_invest_yea2_3" 
				     style="text-align:right; width:80%;" class=" valueGreatEqual:total_invest_yea2_3:total_invest_yea2_2"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='03']/total_invest_yea2" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)" label="资金来源概算-->${param.statYear+1}年-->单位自筹经费"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[03]/total_invest_yea3" id="total_invest_yea3_3"
				     style="text-align:right; width:80%;" class=" valueGreatEqual:total_invest_yea3_3:total_invest_yea3_2"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='03']/total_invest_yea3" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)" label="资金来源概算-->${param.statYear+2}年-->单位自筹经费"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');"
				   />
		</td>
	</tr>
	<tr>
		<td align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其中：银行贷款</td>
		<td align="center">
			<input type="hidden" name="budget/invest_detail_from/invest[02]@invest_code" value="02" />
			<input type="hidden" name="budget/invest_detail_from/invest[02]/name" value="其中：银行贷款" />
			
			<input type="text" name="budget/invest_detail_from/invest[02]/total_each" id="total_each_2" 
				disabled="disabled" value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='02']/total_each"/>" 
				class=" gray " onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;width: 80%"
				label="资金来源概算-->其中：银行贷款-->概算金额"/>
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[02]/total_invest_yea1" id="total_invest_yea1_2"
				     style="text-align:right; width:80%;"  class=" "
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='02']/total_invest_yea1" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)" label="资金来源概算-->${param.statYear }年-->其中：银行贷款"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[02]/total_invest_yea2" id="total_invest_yea2_2"
				     style="text-align:right; width:80%;" class=""
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='02']/total_invest_yea2" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)" label="资金来源概算-->${param.statYear+1}年-->其中：银行贷款"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[02]/total_invest_yea3" id="total_invest_yea3_2"
				     style="text-align:right; width:80%;" class=""
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='02']/total_invest_yea3" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)" label="资金来源概算-->${param.statYear+2}年-->其中：银行贷款"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');
				   			 "
				   />
		</td>
	</tr>
	
	<tr>
		<td align="left">4、其它经费来源</td>
		<td align="center">
			<input type="hidden" name="budget/invest_detail_from/invest[04]@invest_code" value="04" />
			<input type="hidden" name="budget/invest_detail_from/invest[04]/name" value="4、其它经费来源" />
			
			<input type="text" name="budget/invest_detail_from/invest[04]/total_each" id="total_each_4"
				disabled="disabled" value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='04']/total_each"/>" 
				class=" gray" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;width: 80%"
				label="其它经费来源-->概算金额"/>
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[04]/total_invest_yea1" id="total_invest_yea1_4"
				     style="text-align:right; width:80%;"  class="" label="资金来源概算-->${param.statYear }年-->其它经费来源"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='04']/total_invest_yea1" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[04]/total_invest_yea2" id="total_invest_yea2_4"
				     style="text-align:right; width:80%;"  class=""	label="资金来源概算-->${param.statYear+1}年-->其它经费来源"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='04']/total_invest_yea2" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[04]/total_invest_yea3" id="total_invest_yea3_4"
				     style="text-align:right; width:80%;"  class="" label="资金来源概算-->${param.statYear+2}年-->其它经费来源"
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='04']/total_invest_yea3" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
					   onchange="
				   			 countFundAuto('total_','invest_yea1_0,invest_yea1_1,invest_yea1_3,invest_yea1_4','invest_yea1_5');
				   			 countFundAuto('total_','invest_yea2_0,invest_yea2_1,invest_yea2_3,invest_yea2_4','invest_yea2_5');
				   			 countFundAuto('total_','invest_yea3_0,invest_yea3_1,invest_yea3_3,invest_yea3_4','invest_yea3_5');
				   			 countFundAuto('total_','invest_yea1_0,invest_yea2_0,invest_yea3_0','each_0');
				   			 countFundAuto('total_','invest_yea1_1,invest_yea2_1,invest_yea3_1','each_1');
				   			 countFundAuto('total_','invest_yea1_2,invest_yea2_2,invest_yea3_2','each_2');
				   			 countFundAuto('total_','invest_yea1_3,invest_yea2_3,invest_yea3_3','each_3');
				   			 countFundAuto('total_','invest_yea1_4,invest_yea2_4,invest_yea3_4','each_4');
				   			 countFundAuto('total_','each_0,each_1,each_2,each_3,each_4,','investfrom_5');"
				   />
		</td>
	</tr>
	<tr>
		<td align="center"><strong>来源合计</strong></td>
		<td align="center">
			<input type="hidden" name="budget/invest_detail_from/invest[05]@invest_code" value="05" />
			<input type="hidden" name="budget/invest_detail_from/invest[05]/name" value="来源合计" />
			<input type="text" name="budget/invest_detail_from/invest[05]/total_investfrom" id="total_investfrom_5"
				   class=" gray valueEqual:total_investfrom_5:total_subtotal17" disabled label="资金来源概算-->来源合计-->概算金额"  style="text-align:right; width:80%;" 
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='05']/total_investfrom" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[05]/total_invest_yea1" id="total_invest_yea1_5"
				   class=" gray" disabled label="直接费用-->概算金额"  style="text-align:right; width:80%;" 
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='05']/total_invest_yea1" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[05]/total_invest_yea2" id="total_invest_yea2_5"
				   class=" gray" disabled label="直接费用-->概算金额"  style="text-align:right; width:80%;" 
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='05']/total_invest_yea2" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
				   />
		</td>
		<td align="center">
			<input type="text" name="budget/invest_detail_from/invest[05]/total_invest_yea3" id="total_invest_yea3_5"
				   class=" gray" disabled label="直接费用-->概算金额"  style="text-align:right; width:80%;" 
				   value="<x:out  select="$xmlData/data/budget/invest_detail_from/invest[@invest_code='05']/total_invest_yea3" />" 
				   onfocus="InitInput.setNumber(this,9,2,2)"
				   />
		</td>
	</tr>
</table>	

<script type="text/javascript">
	$(function(){
		count();
		changeCss();
		//fileInit_1("tblMileStones1","PDF",null,"{'PDF':'20480'}");
	//	$("#tblMileStones1").find(".file").hide(); */
		//setInvest_detail_from();
	});
	function count() {
		$("#total_price2").val("0");
		$("#eq_table2 tr:gt(1)").each(function() {
			var moneys=$(this).find("td:eq(5) input").val(); 
			
			/* var num=$(this).find("td:eq(5) input").val(); */
			
			 if(!!!moneys){
				moneys="0";
			} 
			
			/* $(this).find("td:eq(6) input").val(formatVal(price_each*num)); */
			$("#total_price2").val(formatVal(parseFloat($("#total_price2").val())+parseFloat(moneys)));
			
			/* numall2=parseFloat(numall2)+parseFloat(num); */
		});
		
		/* $("#total_num2").val(numall2); */
	}
	function deletecount(){
		
		$("#total_price2").val(formatVal(parseFloat($("#total_price2").val())+(-parseFloat(moneys))));
	}
	function formatVal(count) {
		if (!$.isNumeric(count))
		count = "0";
		count = ((parseFloat(count) * 10000) / 10000).toFixed(4);
		count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
		return count;
	}
	//合同书读取批准拨款金额
/* 	function setInvest_detail_from(){
		var current_year_amt = '${current_year_amt}';
		var second_year_amt = '${second_year_amt}';
		var third_year_amt = '${third_year_amt}';
		$("#total_invest_yea1_0").val(formatNumberAuto(current_year_amt.toString(), 9, 4, 2)).change();
		$("#total_invest_yea2_0").val(formatNumberAuto(second_year_amt.toString(), 9, 4, 2)).change();
		$("#total_invest_yea3_0").val(formatNumberAuto(third_year_amt.toString(), 9, 4, 2)).change();
} */
	
	function changeCss() {
			$("table.t_css").each(function(){
				$(this).find("tr:even").removeClass().addClass("li_1");
				$(this).find("tr:odd").removeClass().addClass("li_2");
			});
			changeCss1("fundInfo","tblMileStones1");
		}
		function changeCss1(id1,id2) {
			if($("#"+id1+" tr:last").attr("class")=="li_1"){
				$("#"+id2+" tr").removeClass("li_1").addClass("li_2");
			}else{
				$("#"+id2+" tr").removeClass("li_2").addClass("li_1");
			}
		}
		
		
		
		function uploadfile(index,i){
			if(2==index){
				$("#proof_file_data").click();
				
			}
			else
			$("#card_file").click();
		}
		/* function show(index){
			$("#kepu").find("#proof_file"+index).show();
		} */
		function fileInit_1(tableId, type, width, validateJson) {
			 var imgres="";
			
			 if(locale=="en_US"){
			    imgres="Upload_EN.gif";
			    
			}else{
				imgres="Upload_2.gif";
				
			}
			$("#" + tableId).find(":file").filestyle({
				image : res + "/images/"+imgres,
				imageheight : 25,
				imagewidth : 56,
				width : width
			});  
			$("#" + tableId).find(":file").not("#filedata\\[0\\]").each(function(i) {
				$(this).change(function() {
					var str = $(this).attr("id");
					var index = str.charAt(str.length - 1);
					showFileName_1($(this), tableId, type, validateJson,index);
				});
			});
		}
		
		function showFileName_1(obj, tableId, type, validateJson,index) {
			var max = null;
			var fileTblId=null;// 文件列表的表格id

			fileTblId=tableId;
			var filedata = obj.val();
			if (filedata == '')
				return;
			else if(max!=null && $.isNumeric(max) && fileTblId!=null && $("#"+fileTblId+" tr:gt(1)").length>=max){
				var label="";
				if($("#"+fileTblId).attr("label")!=null)
					label=$("#"+fileTblId).attr("label");
				
				scmWarn(label+messageTip.canNotUploadMoreThan+max+messageTip.files1);
				return;
			} else {
				var fileName = filedata.substring(filedata.replace(/\\/g, '/')
						.lastIndexOf('/') + 1);
				var end = fileName.substring(fileName.lastIndexOf(".") + 1,
						fileName.length).toUpperCase();
				if (type.indexOf(end) < 0) {
					scmWarn(messageTip.pleaseUpload + type + messageTip.files2, "100px");
					return;
				}
			}

			$("#" + tableId + " .file").val(fileName);
			ajaxFileUpload_1(obj,"orgattach", tableId, type, max, validateJson,index);
		}
		
		function ajaxFileUpload_1(obj,type, tblId, filetype, max, validateJson,index) {
			irisAjaxFileUpload_1(obj,type, tblId, filetype, max, validateJson,index);
		}
		
		function uploadSuccess_1(obj,data, tableId, filetype,index){
			$("#"+tableId).find("#file_code"+index).val(data[data.length-1].fileCode);
			$("#"+tableId).find("#file_name"+index).text(data[data.length-1].fileName);
			$("#"+tableId).find("#file_url"+index).attr("href", downloadPath + data[data.length-1].fileCode);
			$("#proof_file"+index).show();
			$("#sy_delConent"+index).show();
			
/* 				var fileDate = $("#" + tableId).find("span[id='file_date'"+index+"]");// 上传时间对象
*/				
				var fileDate = $("#" + tableId).find("#file_date"+index);// 上传时间对象
				var nowTime = showLocale(new Date());
			fileDate.text(nowTime);
			$("#"+tableId).find("#"+index).show();
		}
		
		function irisAjaxFileUpload_1(obj,type, tableId, fileType, max, validateJson,index) {
			if (type == null || type == '') {
				scmWarn(messageTip.pleaseEnterTypeOfAttachment);
				return;
			}
			$("#"+tableId+" input[type='file']").not(obj).each(function(){
				this.outerHTML=this.outerHTML.replace(/(value=\").+\"/i,"$1\""); 
			});

			
			prcWin.openWin();// 打开遮罩层
			$.ajaxFileUpload({
				url : ctx + '/file/ajax-fileupload',// 请求地址
				secureuri : false,// 一般设置为false
				fileElementId : 'filedata',// 文件的id属性
				limitSize : '10',// 允许上传的文件大小,单位M
				allowType : 'PDF',// 允许上传的文件类型.
				data : {
					'type' : type,
					'validateJson':validateJson
				},
				tableId : tableId,// tableID
				dataType : 'json',// 返回值类型
				success : function(data, status) // 服务器成功响应处理函数
				{
					if (data.result == 'error') {
						scmWarn(data.msg);
					} else {
						
						uploadSuccess_1(obj,data, tableId, fileType,index);
						
						
						$("#"+tableId).find(":file").not("#filedata\\[0\\]").each(function(i) {
							fileType="PDF";
							validateJson="{'PDF':'20480'}";
							$(this).unbind("change");
							$(this).change(function() {
								var str = $(this).attr("id");
								var index = str.charAt(str.length - 1);
								 showFileName_1($(this), tableId, fileType, validateJson,index); 
							});
						});
					}
					prcWin.closeWin();// 关闭遮罩层
				},
				error : function(data, status, e)// 服务器响应失败处理函数
				{
					$("#"+tableId+" input[type='file']").each(function(j) {
						this.outerHTML=this.outerHTML.replace(/(value=\").+\"/i,"$1\""); 
					});
					

					$("#"+tableId).find(":file").not("#filedata\\[0\\]").each(function(i) {
						fileType="JPG，PNG，DOC，WPS，DOCX，PDF，XLS，XLSX，TIFF，RAR";
						validateJson="{'JPG':'20480','PNG':'20480','DOC':'20480','WPS':'20480','DOCX':'20480','PDF':'20480','XLS':'20480','XLSX':'20480','TIFF':'20480','RAR':'20480'}";
						$(this).unbind("change");
						$(this).change(function() {
							showFileName_1($(this), "mainGoodsInfo", fileType, validateJson,index);
						});
					});
					if (data && data.responseText && data.responseText.indexOf('413') > -1) {
				scmError("上传的文件超过限制大小！");
			} else {
				scmError(status);
			}
					prcWin.closeWin();// 关闭遮罩层
				},
				complete:function()
				{
					prcWin.closeWin();// 关闭遮罩层
				}
			});

		}
		
		
		function delContent_1(tableId,index) {
			if (confirm("你确定要删除该附件？")) {
				/* $("#" + tableId).find("input[id='file_code']").val("");// 清空文件名
				$("#" + tableId).find("span[id='file_date']").text("");// 清空文件code
				$("#" + tableId).find("span[id='file_name']").text("");// 清空文件上传日期
				$("#"+tableId).find("#proof_content").hide(); */
				
				$("#" + tableId).find("#file_code"+index).val("");// 清空文件名
				$("#" + tableId).find("#file_date"+index).text("");// 清空文件code
				$("#" + tableId).find("#file_name"+index).text("");// 清空文件上传日期
				$("#"+tableId).find("#proof_content"+index).hide();
				
				$("#sy_delConent"+index).hide();
				$("#file"+index).val("");
				$("#proof_file"+index).hide();
				
				/* $("#" + tableId).find("#proof_file"+index).hide(); */
				
			}
		}	
		function countFundAuto(idStart, countStr, totalStr) {
		var indexs = countStr.split(",");
		var count = 0;
		for ( var i = 0; i < indexs.length; i++) {
			var fund = $("#" + idStart + indexs[i]).val();
			if (!$.isNumeric(fund))
				fund = "0";
			count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
		}
		count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
		//add by cg 扩展：对于多个输入框所求得的和，同时赋给某几个文本框
		var totalStrArr = totalStr.split(",");
		var totalId;
		for(var i = 0;i < totalStrArr.length; i++ ) {
			totalId = totalStrArr[i];
		$("#" + idStart + totalId).val(count);
		}
	}
		
</script>